import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { SITE_DETAIL } from './baseUrlConfig';

@Injectable({
  providedIn: 'root'
})
export class SiteListService {

  constructor(
    private httpClient: HttpClient,
  ) { }

  /** 获取站点信息 */
  getSiteDetail() {
    return new Promise((resolve) => {
      this.httpClient.get(SITE_DETAIL.GET_SITE_DETAIL).subscribe(response => {
        resolve(response);
      })
    })
  }

  /** 储能效益统计饼图数据 */
  getPieData() {
    // return new Promise((resolve) => {
    //   this.httpClient.get(SITE_DETAIL.GET_SITE_DETAIL).subscribe(response => {
    //     resolve(response);
    //   })
    // })
  }


  /** 获取站点储能系统告警和健康状态数据 */
  getHealthData() {
    // return new Promise((resolve) => {
    //   this.httpClient.get(SITE_DETAIL.GET_SITE_DETAIL).subscribe(response => {
    //     resolve(response);
    //   })
    // })
  }

  /** 上传电价到后台 */
  exportElectrovalenceExcel() {
    // return new Promise((resolve) => {
    //   this.httpClient.get(SITE_DETAIL.GET_SITE_DETAIL).subscribe(response => {
    //     resolve(response);
    //   })
    // })
  }

}